package com.sanyu.controller.user;

import com.sanyu.pojo.dto.DevicePageQueryDTO;
import com.sanyu.pojo.vo.DeviceStatusVO;
import com.sanyu.pojo.vo.DeviceVO;
import com.sanyu.result.PageResult;
import com.sanyu.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/device")
@Api("用户APP/设备管理相关接口")
public class DeviceController {

    @GetMapping("/{id}")
    @ApiOperation("根据ID获取设备信息")
    public Result<DeviceVO> getDevice(@PathVariable Long id){
        DeviceVO deviceVO = new DeviceVO();
        return Result.success(deviceVO);
    }

    @GetMapping("/{id}/status")
    @ApiOperation("根据ID获取设备水质信息")
    public Result<DeviceStatusVO> getStatus(@PathVariable Long id){
        DeviceStatusVO devicestatusvo = new DeviceStatusVO();
        return Result.success(devicestatusvo);
    }

    @GetMapping("/page")
    @ApiOperation("分页查询设备列表")
    public Result<PageResult> page(DevicePageQueryDTO devicePageQueryDTO){
        PageResult pageResult = new PageResult();
        return Result.success(pageResult);
    }
}
